package cn.com.stary1993.kite.captcha.config;

import cn.com.stary1993.kite.captcha.support.simple.SimpleImageCaptchaType;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 简单图形验证码配置
 *
 * @author stary1993
 */
@Data
@ConfigurationProperties(prefix = CaptchaProperties.PREFIX + "." + CaptchaProperties.SIMPLE)
public class SimpleImageCaptchaProperties {

    /**
     * 是否开启
     */
    private Boolean enabled = true;

    /**
     * 过期key prefix.
     */
    private String keyPrefix = "simple";

    /**
     * 验证码类型.
     */
    private SimpleImageCaptchaType type = SimpleImageCaptchaType.spec;

    /**
     * 超时 默认 100000ms.
     */
    private long expire = 100000L;

    /**
     * 默认长度，默认值： 4
     */
    private int len = 4;

    /**
     * 默认宽度，默认值： 130
     */
    private int width = 130;

    /**
     * 默认高度，默认值：48
     */
    private int height = 48;

    /**
     * 字体名，默认 SansSerif
     */
    private String font = "SansSerif";

    /**
     * 干扰线数
     */
    private int lineCount;

    /**
     * 圆圈干扰线
     */
    private int circleCount;

    /**
     * 是否扭曲
     */
    private boolean isSheared;

}
